package opp.Abstract.RentCar;

public class Tractors extends Vickie {
    //拖拉机
    double displacement;//排量

    public
    Tractors(double displacement) {
        this.displacement = displacement;
    }

    public
    double getDisplacement() {
        return displacement;
    }

    public
    void setDisplacement(double displacement) {
        this.displacement = displacement;
    }

    @Override
    double CountFee(int days) {
        double Fee=0;
        if (displacement<=2)
        {
            Fee=180*days;
        }else
        {
            Fee=220*days;
        }
        return Fee;
    }

}
